package com.zhang.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

@Api(tags = "权限实体类")
@Data
@NoArgsConstructor
@TableName("t_power")
public class PowerBean {


    @ApiModelProperty("权限id")
    @TableId(value = "pk_powerId",type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("权限名")
    @TableField(value = "p_name")
    private String name;

    @ApiModelProperty("权限url路径")
    @TableField(value = "p_url")
    private String url;

    public PowerBean(String name, String url) {
        this.name = name;
        this.url = url;
    }

    @Override
    public String toString() {
        return "PowerBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", url='" + url + '\'' +
                '}' + "\n";
    }
}
